<%--
  Created by IntelliJ IDEA.
  User: LJS
  Date: 2018/11/15
  Time: 14:13
  To change this template use File | Settings | File Templates.
--%>
<%@ page language="java" contentType="text/html;charset=UTF-8" pageEncoding="UTF-8" %>
<%
    String path = request.getContextPath();
    String basePath = request.getScheme() + "://" + request.getServerName()
            + ":" + request.getServerPort() + path + "/";
%>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
    <meta http-equiv="Content-Type" content="text/html;charset=UTF-8">
    <title>开会内容日志</title>
    <jsp:include page="resource.jsp"/>
    <script type="text/javascript">
        function addrow(){
            for(var i = 1; i < 100; i++){
                var indexName="details"+1;
                var trHTML = "<tr><td><input type='text' class='form-control limitInput' maxlength='20' id='"+indexName+'1'+"' name='"+indexName+'1'+"' /></td>"
                    +"<td><input type='text' class='form-control limitInput' maxlength='20' id='"+indexName+'2'+"' name='"+indexName+'2'+"' /></td>"
                    +"<td><input type='text' class='form-control limitInput' maxlength='20' id='"+indexName+'3'+"' name='"+indexName+'3'+"' /></td>";
            }
            $("#details-table").append(trHTML);//在table最后面添加一行
        }
        function deleteTrRow(){
            $("#details-table tr:not(:first):not(:first):last").remove(); //移除最后一行,并且保留前两行
            //$(this).closest('tr').remove();
        }
    </script>
</head>
<body>
<jsp:include page="common.jsp"/>

<!-- Start #content -->
<div id="content">
    <!-- Start .content-wrapper -->
    <div class="content-wrapper">
        <!-- Start .row -->
        <div class="row">
            <!-- Start .page-header -->
            <div class="col-lg-12 heading">
                <h1 class="page-header"><i class="me-wind"></i> 开会内容日志</h1>
            </div>
            <!-- End .page-header -->
        </div>
        <!-- End .row -->
        <!-- Start .outlet -->
        <div class="outlet">
            <!-- Page start here ( usual with .row ) -->
            <div class="row printable">
                <!-- col-lg-12 start here -->
                <div class="col-lg-12">
                    <!-- Start .panel -->
                    <div class="panel panel-default plain">
                        <div class="panel-heading white-bg"></div>
                        <div class="panel-body">
                            <!-- Start .invoice -->
                            <div class="invoice">
                                <a href="<%=basePath%>toMeeting.do" class="mb5">返回</a>
                                <a href="javacript:void(0);" class="pull-right mb5" onclick="editable()"><i class="ec-pencil"></i> 修改</a>
                                <form class="form-horizontal" id="invoice-form">
                                    <table class="table table-bordered">
                                        <tr>
                                            <td><label for="" class="control-label">会议主题</label></td>
                                            <td colspan="3">
                                                <textarea class="form-control limitTextarea" maxlength="150" rows="2" disabled="disabled"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="15%">
                                                <label for="" class="control-label">会议时间</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20" id="" name="" disabled="disabled">
                                            </td>
                                            <td width="15%">
                                                <label for="" class="control-label">会议地点</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20" id="" name="" disabled="disabled">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="15%">
                                                <label for="" class="control-label">主持人姓名</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20" id="" name="" disabled="disabled">
                                            </td>
                                            <td width="15%">
                                                <label for="" class="control-label">记录人姓名</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20" id="" name="" disabled="disabled">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td width="15%">
                                                <label for="" class="control-label">应到人数</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20" id="" name="" disabled="disabled">
                                            </td>
                                            <td width="15%">
                                                <label for="" class="control-label">实到人数</label>
                                            </td>
                                            <td width="35%">
                                                <input type="text" class="form-control limitInput" maxlength="20" id="" name="" disabled="disabled">
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="" class="control-label">会议内容</label></td>
                                            <td colspan="3">
                                                <textarea class="form-control limitTextarea" maxlength="150" rows="2" disabled="disabled"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="" class="control-label">会议结论</label></td>
                                            <td colspan="3">
                                                <textarea class="form-control limitTextarea" maxlength="150" rows="2" disabled="disabled"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="" class="control-label">会议总结</label></td>
                                            <td colspan="3">
                                                <textarea class="form-control limitTextarea" maxlength="150" rows="2" disabled="disabled"></textarea>
                                            </td>
                                        </tr>
                                        <tr>
                                            <td><label for="" class="control-label">参会人员</label></td>
                                            <td colspan="3">
                                                <table class="table table-bordered" id="details-table">
                                                    <tr>
                                                        <td>员工工号</td>
                                                        <td>员工姓名</td>
                                                        <td>是否到场</td>
                                                    </tr>
                                                    <tr>
                                                        <td><input type="text" class="form-control limitInput" maxlength="20" id="details01" name="details01" disabled="disabled"></td>
                                                        <td><input type="text" class="form-control limitInput" maxlength="20" id="details02" name="details02" disabled="disabled"></td>
                                                        <td><input type="text" class="form-control limitInput" maxlength="20" id="details03" name="details03" disabled="disabled"></td>
                                                    </tr>
                                                </table>
                                                <input type="button" class="btn btn-xs btn-primary" id="addRowBtn" onclick="addrow();" value="新增一行" />
                                                <input type="button" class="btn btn-xs btn-danger" id="delRowBtn" onclick="deleteTrRow();" value="删除一行" />
                                            </td>
                                        </tr>
                                    </table>
                                    <div class="form-group">
                                        <input type="submit" class="btn btn-primary col-md-3 col-md-offset-4" value="保存" />
                                    </div>
                                </form>
                            </div>
                            <!-- End .invoice -->
                        </div>
                    </div>
                    <!-- End .panel -->
                </div>
                <!-- col-lg-12 end here -->
            </div>
            <!-- Page End here -->
        </div>
        <!-- End .outlet -->
    </div>
    <!-- End .content-wrapper -->
    <div class="clearfix"></div>
</div>
<!-- End #content -->
</body>
</html>
